package com.hzh.jetpackcomposecompositionlocal.sample

import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.padding
import androidx.compose.material3.LocalContentColor
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.Scaffold
import androidx.compose.material3.Text
import androidx.compose.runtime.Composable
import androidx.compose.runtime.CompositionLocalProvider
import androidx.compose.ui.Modifier
import androidx.compose.ui.platform.LocalContext
import com.hzh.jetpackcomposecompositionlocal.Greeting
import com.hzh.jetpackcomposecompositionlocal.R
import com.hzh.jetpackcomposecompositionlocal.ui.theme.DN_Compose_LearnTheme

/**
 * @author huangzehui
 * @date 18/8/2025 下午10:37 周一
 * @description
 */


@Composable
fun CompositionSample3() {
    DN_Compose_LearnTheme {
        Scaffold(modifier = Modifier.fillMaxSize()) { innerPadding ->
            Column(modifier = Modifier.padding(innerPadding)) {

                CompositionLocalProvider(value = LocalElevations provides CarElevation.high) {
                    MyCard(backgroundColor = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.05f)) {

                    }
                }

                MyCard(backgroundColor = MaterialTheme.colorScheme.onSurface.copy(alpha = 0.05f)) {

                }

            }
        }

    }
}
